﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz.Net.Model;
using System.Data.OracleClient;
using System.Data;

namespace Quartz.Net.DAL
{
    /// <summary>
    /// 人员操作日志表
    /// </summary>
   public class Task_Quartz_OperationLogDAL
    {
       public int InsertOperation(Task_Quartz_OperationLogModel model)
       {
           string strSql = @" insert into TASK_QUARTZ_OPERATIONLOG (NGUID,JOBGUID,OPERATETIME,OPERATESTATUS,OPERATETOR,OPERATETORNAME,OPERATEIP,OPERATEDATE,OPERATEDETAILS,VALID)
                            values (:NGUID,:JOBGUID,:OPERATETIME,:OPERATESTATUS,:OPERATETOR,:OPERATETORNAME,:OPERATEIP,:OPERATEDATE,:OPERATEDETAILS,:VALID) ";
           OracleParameter[] para = {
                                        new OracleParameter(":NGUID",OracleType.VarChar,200),
                                        new OracleParameter(":JOBGUID",OracleType.VarChar,200),
                                        new OracleParameter(":OPERATETIME",OracleType.Timestamp),
                                        new OracleParameter(":OPERATESTATUS",OracleType.Char,1),
                                        new OracleParameter(":OPERATETOR",OracleType.VarChar,200),
                                        new OracleParameter(":OPERATETORNAME",OracleType.VarChar,200),
                                        new OracleParameter(":OPERATEIP",OracleType.VarChar,200),
                                        new OracleParameter(":OPERATEDATE",OracleType.DateTime),
                                        new OracleParameter(":OPERATEDETAILS",OracleType.VarChar,200),
                                        new OracleParameter(":VALID",OracleType.Char,1)
                                    };
           para[0].Value = model.NGUID;
           para[1].Value = model.JOBGUID;
           para[2].Value = model.OPERATETIME;
           para[3].Value = model.OPERATESTATUS;
           para[4].Value = model.OPERATETOR;
           para[5].Value = model.OPERATETORNAME;
           para[6].Value = model.OPERATEIP;
           para[7].Value = model.OPERATEDATE;
           para[8].Value = model.OPERATEDETAILS;
           para[9].Value = model.VALID;

           return DalBase.ExecuteNonQuery(strSql, para);
       }
    }
}
